package net.vz.geoapi.examples;

import net.vz.geoapi.KeywordSearch;

/**
 * simple test class for geoapi service
 * @author sirrgang
 *
 */
public class KeywordSearchTest {

    public static final String apiKey = "demo";
    
    /**
     * @param args
     */
    public static void main(String[] args) {
        
        testKeywordSearch();
        testKeywordSearchWithGuid();
    }
    
    public static void testKeywordSearch() {
        KeywordSearch keyword;
        
        keyword = new KeywordSearch(apiKey);
        keyword.setQuery("San Francisco, CA");
        keyword.setLimit(10);
        
        try {
            String response = keyword.doRequest();
            System.out.println(response);
        } catch (Exception _e) {
            _e.printStackTrace();
        }
    }
    
    public static void testKeywordSearchWithGuid() {
        KeywordSearch keyword;
        
        keyword = new KeywordSearch(apiKey);
        keyword.setQuery("ritual");
        keyword.setEntityGuid("san-francisco-ca");
        keyword.setLimit(10);
        
        try {
            String response = keyword.doRequest();
            System.out.println(response);
        } catch (Exception _e) {
            _e.printStackTrace();
        }
    }

}
